/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package trombinoscope.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.*;


/**
 *
 * @author Jonathan
 */
public class servletDeconnexion extends HttpServlet {

	public void processRequest(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
        {
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            
            HttpSession session = request.getSession(true); 
            session.invalidate();   
            request.getRequestDispatcher("authentification.jsp").forward(request, response);
            
	}
          @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {       
            processRequest(request, response);          
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {        
            processRequest(request, response);        
    }    
    @Override
    public String getServletInfo() {
        return "Short description";
    }// </editor-fold>
}
